import service from ".";

const memberApi = {
    // 分页（条件）查询会员列表
    search(params) {
        return service.get(
            '/member',
            {params}
        ).then(response=>response.data)
    },
    //添加会员
    add(member) {
        return service.post(
            '/member',
            member
        ).then(response=>response.data)
    },
    //编辑会员
    edit(member) {
        return service.put(
            '/member',
            member
        ).then(response=>response.data)
    },
    //删除会员
    remove(id) {
        return service.delete(
            '/member/'+id,
        ).then(response=>response.data)
    }
}

export default memberApi